changed the fitting to loglikelihood, modified the graphs of the parameters not to crash on strange parameters values (-nan)
fixed bug in the chi2/ndf graph