fix fatal bug: use incorrect environment variable at module