remove last duplicate