Fixed #677
Merge pull request #814 from dvvrd/fix677

Fixed #677