Fixed rotation and scaling issues