fixed set_preference in upgrade-funcs