Adds fixes to example code

Jira-issue: API-43