fixed a potential issue with missing index folder