fixed dir bug