Fix order number generation