Fix issues with subprocess status