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

...1.6.