Fixed rotation matrix bug