fix intra-file indexing