fix "not a directory"