PTFM-8103, PTFM-8359 fixed dx_bed_to_spans script