Trying to fix the gimbal lock in quaternion to euler system