fixing rotation bug finally