fix unit test
Merge branch 'issue777' into 1.7.x