Fix prefs.get() usage before prefs will be initialized