Attempt to fix duplicates in history