Fix environment variable setup