Removes duplicate index
Avoids empty mass inserts