Fixed silly bug in deduplicate