Fix deleting bug.