add more tests for indexing; fix bug in index equality test