Updated setting of global vars