Fix possible deadlock in run_shell.
Inc version.