Various fixes for indices