remerge fixes in official tree to the local fixes.