Preferences are not saving - fix by Konstantin Marmalyukov