fix a weird bug where indices are indistinguishable