fixed directory crash issue