Fix for issue #593