Fix calculation of line-width