Fix a crash, closes #91