fixed eq function failing on 0 indexes