Bug fix for directory presence