Preferences are now stored and loaded correctly