Fix error line numbers when a range is run