fix deadlock on subprocess wait usage