-- fixed the bugs in checkout