Fixed #849
Merge pull request #967 from dvvrd/fix849

Fixed #849