fixed remove directory entry problem