fixed merging problem for index