Add some error checking to room switching