Call cancel() on deinit in case machine is still running.