Added debugging stuff for resets