Fix NaN when total is null in Redis