a few more indexing bugs