latest apim 1.7.1 changes
Merge pull request #3 from rswijesena/master

Merging changes by Roshan