fixes #1178
Merge branch 'v1.7.x' into next