Repaired (partially) the rotation bug