fix global variables in grapher