Fixing a bug with quaternion animations