Fix cast problem in HC