WP-1075 Fix appId extraction

http://jira.webinos.org/browse/WP-1075