hms type detection fix