fix from master/20554 branch