Fix for issue #629