fix page save and close in ajaxsave