Merge branch 'issue757' into 1.7.x
Add the fix and a test case to prove the fix.
Merge branch 'issue760' into 2.0.x