fix strange overwriting of the custom output when the new button is clicked - issue #3