Fix bug in test helper.