fixed reset bug