Fixed a type-checking error