fixed some errors because of copy-pasted code from an older version. Room switching still buggy