Partially fixed #727
Merge pull request #760 from dvvrd/fix727

Fixed #727