Fix #223. setTotal should take long as a parameter.