rotate fix optimizing