Fix line numbers in model error messages