Fixing problem in issue 534.
Merge pull request #682 from janeznemanic/master

Fixing problem in issue 534.