Fixes globals leak.