Fix edge case with failure_max.