Multidimension array index fixing