Fixed bugs in the decay fit