Fix process global var bug