Folder detection fix