Save setting when the options form is closed.