fix a bug when shopping cart is empty