Fix for issue 707

Update fix based on discussion in #708