Applying HIVE-7077 fix