Merge Fixes from 1.x branch to 2.x branch.

...v1.6.