SharedPreferences fixed: save and retrieve settings