Fix bug in error message