Fixed crash bug.

SharedPrefs variable now not set to static and defined twice.