Fixed hl function