Fix for issue #332