Fixed projection issues in hputils.py