Fix bugs in lst_hash