bugfixing for subfolders