Fixed bug with repeat simulation runs