Fixed #793
Merge pull request #846 from dvvrd/fix793

Fixed #793