Fixed rotate() issues (incorrect rotation due to float and issues with coordinate reference)