Fix SharedPreferences permission problem