Fix a bug with alloy.py constantly throwing an exception