Fix for issue #649

Here is the fix for #649