error prevention in cart.php