Fix the rotate() function

Description in #40