bug fixed on rotation