fix Issue #709

This is a patch to fix issue #709