Fixed bug in HNF.
Fixing HNF.