Fix types for Msi* calls