Fixes a bug when updating the number of variables
Cosmetic change to DOT export