Fix a bug in the tail-fitting macro and add more fits for qcd shape uncertainties