Using correct unit id for indices