fix auto rotate