Fixed set dir bug