Fixed undefined errors on formulate stats.

Transferred the fetchprogresshistoryof() call inside the success
function.