fix a bug in cart