3dMVM -resid related error

Hello,

I have the following simple script (fixed effects simplified for clarity) running:


3dMVM -prefix test9 -jobs 1 \
       -wsVars "session" \
       -mask "mask.nii.gz" \
       -num_glt 1 \
       -gltLabel 1 "1 > 2" \
       -gltCode 1 "session: 1*H1 -1*H2" \
       -dataTable @datatable_mvm.txt

… however when I append the -resid flag


[..]
Z slice  39 done:  03/11/23 17:55:11.008 
Z slice  40 done:  03/11/23 17:55:11.803 
Error in aperm.default(apply(inData[, , kk, ], c(1, 2), runAOV, dataframe = lop$dataStr,  : 
  'perm' is of wrong length 3 (!= 2)
Calls: aperm -> aperm.default

I also noticed that depending on which mask I choose it happens at a different slice?
Any help would be much appreciated