fixed valid rotate bug