fix multi dimensional array access