fix the bug when changing floors