I've observed that boredom and/or malnutrition increase egg
pecking. Some greens, more free range time, and plenty of calcium in the
form of crushed egg shells or oyster might help. Another thing is to
collect the eggs as often as possible so they don't have the chance to
form the habit (or you can break them of it).
That's just my two cents, and you're not necessarily doing anything wrong.