Better line number handling