This should fix issue refs #676.
Merge pull request #727 from capooti/issue-676

This should fix issue refs #676.