better resets for code; fixes #85