Fixing error where two results could be identical