added indices to fix map saving