WIP restoring master global vars