Fix for issue #661.