initial round of bugfixes for subprocess task