Still some bugs, but at least resetting is working properly