fixed bug with total num of orders