fix reset call by value issue