Fix bug with folder thread when changing folders