fix unneeded replace of index block in some cases