Directory bug fix