Fix a bug in error message