Introduce getValue() in Preferences and fix the loading of values