fixed bugs related to folders