Fixed a bug when assigning classrooms