Various bug fixes in _treatProcessOutput code.