Exporting matrix table with phased data to plink

I’m looking for a way to export my matrix table that contains phased data to plink format.
When I use export_plink, I get the error “HailException: Only support ploidy == 2 and unphased. Found 0|0.”

How can I deal with this issue? I don’t mind losing the phasing, but I would really like to export it.
Thank you!

ah, this is annoying. We should have an easier way to unphase. Currently, this should work:

mt = mt.select_entries(GT = hl.unphased_diploid_gt_index_call(mt.GT.n_alt_alleles()))

thank you!!