diff --git a/commerce_stock.module b/commerce_stock.module
index 4e483e2..3fb341a 100644
--- a/commerce_stock.module
+++ b/commerce_stock.module
@@ -178,7 +178,6 @@ function commerce_stock_add_to_cart_validate($form, &$form_state) {
  */
 function commerce_stock_form_commerce_cart_validate($form, &$form_state) {
   // if user chose to remove an item then valid
-  // @todo: is it safe to check for remove do we have a better way?
   if ($form_state['triggering_element']['#value'] == t('Remove') ) {
     return;
   }
@@ -186,21 +185,22 @@ function commerce_stock_form_commerce_cart_validate($form, &$form_state) {
   foreach ($form_state['values']['edit_quantity'] as $index => $qty) {
     $line_item = $form_state['line_items'][$line_item_index[$index]];
     $line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
-    $product_id = $line_item_wrapper->commerce_product->product_id->value();
-    $product = commerce_product_load($product_id);
-    //$qty_ordered = commerce_stock_check_cart_product_level($product_id);
+    if(in_array($line_item_wrapper->getBundle(), commerce_product_line_item_types())) {
+      $product_id = $line_item_wrapper->commerce_product->product_id->value();
+      $product = commerce_product_load($product_id);
+      //$qty_ordered = commerce_stock_check_cart_product_level($product_id);
 
-    // check using rules
-    commerce_stock_check_product_checkout_rule($product, $qty, $stock_state, $message);
-    // @todo: TEST and update error structure
-    if ($stock_state == 1) {
-      form_set_error("stock_error", $message);
-    }
-    else if ($stock_state == 2) {
-      drupal_set_message($message);
-      // @todo set aproved qty ????
+      // check using rules
+      commerce_stock_check_product_checkout_rule($product, $qty, $stock_state, $message);
+      // @todo: TEST and update error structure
+      if ($stock_state == 1) {
+        form_set_error("stock_error", $message);
+      }
+      else if ($stock_state == 2) {
+        drupal_set_message($message);
+        // @todo set aproved qty ????
+      }
     }
-
   }
 }
 
@@ -321,7 +321,7 @@ function commerce_stock_check_cart_product_level($product_id) {
       if ($order_wrapper) {
         // cycle throw each line item ID
         foreach ($order_wrapper->commerce_line_items as $index => $line_item_wrapper) {
-          if (in_array($line_item_wrapper->type->value(), commerce_product_line_item_types())) {
+          if (in_array($line_item_wrapper->getBundle(), commerce_product_line_item_types())) {
             if($line_item_wrapper->commerce_product->product_id->value() == $product_id){
               $cart_qty += $line_item_wrapper->quantity->value();
             }
@@ -426,7 +426,7 @@ function commerce_stock_checkout_validate($order_wrapper) {
   $found_errors = FALSE;
   // Check each line item
   foreach ($order_wrapper->commerce_line_items as $index => $line_item_wrapper) {
-    if(in_array($line_item_wrapper->type->value(), commerce_product_line_item_types())) {
+    if(in_array($line_item_wrapper->getBundle(), commerce_product_line_item_types())) {
       $product_id = $line_item_wrapper->commerce_product->product_id->value();
       $product = commerce_product_load($product_id);
       $qty_ordered = commerce_stock_check_cart_product_level($product_id);
@@ -469,7 +469,7 @@ function commerce_stock_order_has_out_of_stock($order) {
   $outofstock = FALSE;
   // Check each line item
   foreach ($order_wrapper->commerce_line_items as $index => $line_item_wrapper) {
-    if(in_array($line_item_wrapper->type->value(), commerce_product_line_item_types())) {
+    if(in_array($line_item_wrapper->getBundle(), commerce_product_line_item_types())) {
       $product_id = $line_item_wrapper->commerce_product->product_id->value();
       $product = commerce_product_load($product_id);
       $qty_ordered = commerce_stock_check_cart_product_level($product_id);
