Fixed the line width not getting clamped in some situations.