Fix comparison btw signed and unsigned on for indexes.