Fixed a bug in the output for the simulation.