Fixed bug when leaving a room