Fixing a serious bug of the error messages.