fix readdir bug.