fix bug in type detection