Fixed extra row bug with duplicate feature