Merge following changes (1.17 -> 1.18) from trunk.