Fixed #612
Merge pull request #799 from dvvrd/fix612

Fixed #612