fixed check on valid cart id