fixing bug in TypeUtil