Fix get_dimensionality