Fix for issue #374.