Trying to debug why global vars changes are not reflected