modifies indexing in error line