Bug fix, add environment variable method.