Various indexing fixes