fixed bugs (rotation)