Fixed reading of multidim arrays