fix the room issue when changing tab