fixed error in the sign of the mat2quat function