fix: now the variables are correctly set also in nested and list mode