fixed bug that skipped after directory entry