Fixed some bugs in Cart