some bugfixes (hopefully) when leaving a room