fixed no directory crash