The computation of overline and underlines is missing the line spacing. The result is a completely wrong position for the underlines and the overlines when line spacing is > 0.
Before and after: