fixing REGISTRY-2332

[1] https://wso2.org/jira/browse/REGISTRY-2332