Bug fixes for Office365 scripts