Fixed bug with directory not found