I've added atClose() to the onSave(), please, see above)