Fix exception on rotation