fix for issue #825