error fixed in subprocess execution that prevented termination in some
cases