fix pref init failure because of null values