Changes addressing #787.
Merge pull request #790 from pmienk/master

Changes addressing #787.