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