fix deleting bug.