fix pref passing issue, support more styles