Patching a bug in which carts get emptied