why is the male pecking at females head?
I can't say for sure. If you have set them up to be a breeding pair either he doesn't like her and wants to get rid of her or he's mad because she won't cooperate with his wishes.
Sometimes putting another male in the cage with them, just for a couple of days can adjust their attitudes. I would just sit beside the cage for a fairly long time and watch to find out who does what to the other.
That will help you know what to do. Sometimes they are just incompatible and it's best to split them up.
Hope that helps, Jeanie