integration.py: fixing reference to key without definition