Fix resume previous state when rotation is out of bounds.