Fixed bug that was ignoring a step at the end of the simulation.
Merge remote-tracking branch 'origin/devel' into devel