head shaking while nursing.

My 4 week old nursed constantly all day, just about every hour and a half or sooner. A few times after latching on and being at the breast for a few minutes she would pull off and shake her head frantically then start crying. One of the times I thought I was empty so I switched sides and she still did it. Another time I burped her and she fell asleep for a few then did it again at next feeding. Any idea what this is about and why she's doing it?