Fixed #1096
Merge pull request #1149 from dvvrd/fix1096

Fixed #1096