heap_id_mask fix