Fixed issue #807
Merge pull request #840 from postatum/fix_issue_807

Fixed issue #807