Fix crash in test suite