correct errors with deleted directory