fix up dimensionality so both 2d and 3d indexes work properly