Use state vars in Prefs