fix check on directory name