Fixed the bug of order state not saving.