Fixed reset bug