Fixed #851
Merge pull request #1172 from dvvrd/fix851

Fixed #851