fix prettyprinting of indices