Fixed a major bug that prevented the reset button from working