Bug-fixing of TF output for MadWeight compatibility