numDimension instead of numSelectedDimensions

The operationGray was created with a wrong number of dimensions (2
selected but 1 provided for example) which would result in
ArrayOutOfBoundsException