Fix line numbers in the template