Fix merging index bug

Fix the bug in merging parallel results