fix trace bug; the model now can add multiple values by multiple threads