Partial changes from DRILL-1091 fix (a59debbb2f1562c357d2f444f89cc3887e36319b)

Signed-off-by: vkorukanti <venki.korukanti@gmail.com>