fixed examples and tests have been broken by PR#1083
Merge pull request #1084 from gsomix/feature/issue1058

Fixed examples and tests have been broken by PR#1083