Stop the target when exceptions occur.
Fix tests according to modified sync.