Fix potential bug where creating or joining a room could fail