fix codelist sync function