fix bugs in cart