Fixed debugging in terminate.
Merge branch 'test' into dev