Added invalid cart check