SOS-1437 and SOS-1438

Please backport to 6.1.20