SOS-1381 & SOS-1393

Please backport to 6.1.20