Fix a bug when changing folder