Small fix in directory reading.