part of Issue #868