Fixed reset button bug and other bugs