working prefs with activate checkbox