Disconnect signals after run.
Fix some stalls in the batch processing mode.