Fixed #1138
Merge pull request #1150 from dvvrd/fix1138

Fixed #1138