Webapp update failure issue fix

This will provide the fix for https://wso2.org/jira/browse/APPM-198