fix directory patch