diff --git a/lib/db.js b/lib/db.js
index <HASH>..<HASH> 100644
--- a/lib/db.js
+++ b/lib/db.js
@@ -49,8 +49,8 @@ function updateIndexes(entry, callback)
 	db.indexes.updated.set(torrent.infoHash, torrent.updated);
 	if (torrent.files) torrent.files.forEach(function(x) {
 		getHashes(x).forEach(function(hash) {
-			( (maxSeeders > cfg.minSeedToIndex) ? db.indexes.meta.insert : db.indexes.meta.delete)
-				.bind(db.indexes.meta)(hash, torrent.infoHash);
+			db.indexes.meta.delete(hash, torrent.infoHash); // always ensure there are no duplicates
+			if (maxSeeders > cfg.minSeedToIndex) db.indexes.meta.insert(hash, torrent.infoHash);
 		});
 	});
 	callback && callback();
DB: fix bug with double-indexing torrents