fix "save prefs on exit". Thanks Joseph A Philbrook for reporting and support ideas