Fixed crash on start due to prefs not being initialized