Fix line length formula