further cleanup subprocess handling