fix read dir bug