add update preferences on pref change