Added pickling of stats