Fixed getdents bug