Added a sanity check for variables in the GUI version.