restore old fix from Michele that has been lost
Jira-issue: WP-1280
Merge pull request #12 from paolovergori/WP-1280

restore old fix from Michele that has been lost