Added ability to terminate runs.