Fix reset bug