Fixed bug in Preferences