Fix line number tracking