additional changes to make "Save and test" button work reliably