Fixed bug related to SharedPreferences using WeakReferences to its listeners.