Fix bug that deleting tail