cherry-pick fixes # 4