Fix the scale and rotation matrix operation