fixing https://issues.apache.org/jira/browse/STRATOS-649
fixing https://issues.apache.org/jira/browse/STRATOS-650