some minor tweaking of ajax code in restoreDefaults