Fix for issue #698