fixed error in the fit beta distribution function