Fix bug that converted errors into warnings.