Deleting duplicate element