Fix orientation control bug