HT code bug fix