Fixed a type assertion in an error.