fixing https://wso2.org/jira/browse/IDENTITY-2654
Merge pull request #7 from kdchamil/master

fixing https://wso2.org/jira/browse/IDENTITY-2654 provided by Chamil