Fix environment variable issue for testing on device