Fix a bug that caused a test failure