looking at it i'm guessing you might have a problem with your up axis , do you have a constraint on it at all ? once you pass the point of where your world up axis is it flips .