fixed error in HNF wrapper