fixed the reset bug #35