changed how indexing works

Not happy with this as it is, but rewrite rules are misbehaving.