diff --git a/modules/Migration/schema/660_to_700.php b/modules/Migration/schema/660_to_700.php
index 992991dd0c442cc1e17f6db5328042fb93b1b704..58d2c4031f4b743b4f2067aa0d970f833998030c 100644
--- a/modules/Migration/schema/660_to_700.php
+++ b/modules/Migration/schema/660_to_700.php
@@ -1551,7 +1551,7 @@ if(defined('VTIGER_UPGRADE')) {
 			$taxIdsList[] = $rowData['taxid'];
 		}
 
-		$db->pquery('INSERT INTO vtiger_inventorycharges VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)', array(1, 'Shipping & Handling', 'Flat', 'Fixed', null, '[]', 1, ZEND_JSON::encode($taxIdsList), 0));
+		$db->pquery('INSERT INTO vtiger_inventorycharges VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)', array(1, 'Shipping & Handling', 'Flat', 'Fixed', 0, '[]', 1, ZEND_JSON::encode($taxIdsList), 0));
 	}
 
 	if (!Vtiger_Utils::checkTable('vtiger_inventorychargesrel')) {
diff --git a/modules/Migration/schema/811_to_812.php b/modules/Migration/schema/811_to_812.php
index a0c51c0ef14ae791d4222d057a03d9a7fdfdb2ca..4eec012122b09965faf0be6aef2687d5864f7858 100644
--- a/modules/Migration/schema/811_to_812.php
+++ b/modules/Migration/schema/811_to_812.php
@@ -28,4 +28,8 @@ if (defined('VTIGER_UPGRADE')) {
     // Disabling the mass edit for the inventory line item discount fields.
     $db->pquery("UPDATE vtiger_field set masseditable = 0 where columnname in ('discount_percent','discount_amount') 
     and tablename in ('vtiger_quotes','vtiger_purchaseorder','vtiger_salesorder','vtiger_invoice')", array());
+
+    // Set value to 0 to avoid NaN troubles.
+    $db->pquery("UPDATE vtiger_inventorycharges SET value = 0 WHERE  name = 'Shipping & Handling' and value IS NULL",array());
+
 }