fix failing tests
Merge branch 'issue853-fix' into 1.7.x