Fix enabling/disabling the preferences