fix some issues in checkout.