Fixed a bug in type classification