modification to avoid problem in simulation