solved a simulation bug