fixed the logic around the reset button.