fix failing unit tests
Merge branch 'issue813' into 1.7.x