Fixed bugs with the Boltzmann function and the derivative.