TDQ-9769: enhance the codes.