directory bug fix