auto correct indexing for conditional substmts.