fix error line reporting bug