[*] Fix bug for directories