fix error about 'close' behaviour on frmProgram