Fixed issue with loading empty directories