fixed a few more places where index bug appears