Bug fixes in both rotate methods.