clockwise rotation bug fixed