Fix bitwise_cast usage in hmsb