Fixed #1157
Merge pull request #1162 from dvvrd/fix1157

Fixed #1157