Issue #5873: Fix issues for test