Fixing the 'values not unique' issue