fixing var namespace issues