Merge Habib's fixes

Jira issue: WP-1319