Fixing a bug in directory