Fix potential partially empty reason string.