Fixing env global issues