Fix the globalindex issue