Fix order-bug; Fix statistics accordingly

- Moving aggregation of data from server to client