Fix inverse quaternion calculation