Index error on line length