fixes to subprocess