fix for moiety conversion when extensions are present, MSVC fix