Merge change 4965 into donut

* changes:
  Fix bugs 1827027, 1808979, 1820700.