Porper ordering for stats and statstrend outputs