add proper sync to global variables
doc: add global variables