Added check to prevent assigning errors to an error dataset