Bugfix: closed workbook prematurely in simulation.