Fix for issue 334