fixes duplicate comma separated multiselect

fixes duplicate comma separated multiselect

also fixes existing data with duplicate values. Duplicates cause issues in indexes.