fix for issue #827