Fix for issue #649

Here is the fix for #649

MOD EDIT TO AUTO CLOSE ASSOCIATED ISSUE:
Closes #649