stopped it failing when you get NaNs in rotations (why do you get NaNs in rotations? No idea)