Fix bugs related to having multiple carts.