fix empty-folder behaviour