added bug fix and reset button