Bugfix: close streams when closing the wizard