fixes for Azure compat and bug squashing