fix reset bug