Added self. to resettable variable in reset and mark_for_reset (they were undefined global variables otherwise.)