add code in resetSimulation() 

 simulationState.finish();

        simulationState = null;