Fix for issue#164

Fix for issue#164
Merge pull request #166 from AzureAD/dev

Fix for issue#164