Fix a bug in test