Fixed appId extraction

Jira-issue: WP-1075
Merge pull request #22 from ccameroni/WP-1075-fix-appid-extraction

WP-1075 Fix appId extraction