Fixes issue #795.
Merge pull request #796 from gnclmorais/master

Fixes issue #795.