Chery-pick and merge of fix #160