fixing issue with directories without and index file