corrected ordernumber counting