Bug fixes for MDM-238
Merge branch 'rc3' of https://github.com/WSO2Mobile/mdm into rc3