correcting rotation bug