Improved stats computation.