removed call of restorePrefs