4027 - Terminate worker of previous doc

Attempted fix for issue #4027