TDQ-9441: fix some code issues