fixed variables_global bug