some bugfixes when calling getSharedPrefs();