fixed bug in reset button functionality