Made add_line put the line at the right index.