Fix bugs for Cart