Terminate worker of previous doc