diff --git a/Makefile b/Makefile
index 3ddaee2eb7be7bdcafc5abdc32e5ba3519b6ff4d..dd38653deaa05670e29c73948c95cdd309b8dcbd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 BASE=rules_shipping
 BASE_ADV=rules_shipping_advanced
 PLUGINTYPE=vmshipment
-VERSION=2.4.5
+VERSION=2.4.6
 
 PLUGINFILES=$(BASE).php $(BASE)_base.php $(BASE).script.php $(BASE).xml index.html
 PLUGINFILES_ADV=$(BASE_ADV).php $(BASE)_base.php $(BASE_ADV).script.php $(BASE_ADV).xml index.html
diff --git a/releases/plg_vmshipment_rules_shipping_advanced_v2.4.6.zip b/releases/plg_vmshipment_rules_shipping_advanced_v2.4.6.zip
new file mode 100644
index 0000000000000000000000000000000000000000..007777a7944566da4a069d0085f7716ee8303511
Binary files /dev/null and b/releases/plg_vmshipment_rules_shipping_advanced_v2.4.6.zip differ
diff --git a/releases/plg_vmshipment_rules_shipping_v2.4.6.zip b/releases/plg_vmshipment_rules_shipping_v2.4.6.zip
new file mode 100644
index 0000000000000000000000000000000000000000..1ee1f8b26199f346b15e62688b8a7b0fac9400e5
Binary files /dev/null and b/releases/plg_vmshipment_rules_shipping_v2.4.6.zip differ
diff --git a/rules_shipping.xml b/rules_shipping.xml
index 5b068f5ceed5bf0ed311ffef94da67646e4bf3d0..03be1739a4d7ecd1caeef6fb6d46b2b61ef3a701 100644
--- a/rules_shipping.xml
+++ b/rules_shipping.xml
@@ -6,7 +6,7 @@
     <authorUrl>http://www.open-tools.net</authorUrl>
     <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
     <license>GPL v3+</license>
-    <version>2.4.5</version>
+    <version>2.4.6</version>
     <description>VMSHIPMENT_RULES_DESC</description>
     <files>
 	<filename plugin="rules_shipping">rules_shipping.php</filename>
diff --git a/rules_shipping_advanced.xml b/rules_shipping_advanced.xml
index de90abfe440159c8f14ff4cd8de2cbf21348a70d..4b27e368f17522f93dc2ac9019b2a35376cff696 100644
--- a/rules_shipping_advanced.xml
+++ b/rules_shipping_advanced.xml
@@ -6,7 +6,7 @@
     <authorUrl>http://www.open-tools.net</authorUrl>
     <copyright>Copyright (C) 2013, Reinhold Kainhofer</copyright>
     <license>GPL v3+</license>
-    <version>2.4.5</version>
+    <version>2.4.6</version>
     <description>VMSHIPMENT_RULES_ADV_DESC</description>
     <files>
 	<filename plugin="rules_shipping_advanced">rules_shipping_advanced.php</filename>
diff --git a/rules_shipping_base.php b/rules_shipping_base.php
index 27db5f1d291a86d4f8df90b335e36670412640e6..61148b3618fd2cbeba1bb2fd89ac22f8c8dc9c13 100644
--- a/rules_shipping_base.php
+++ b/rules_shipping_base.php
@@ -291,7 +291,8 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
 				$cart_prices['salesPrice' . $_psType] = $calculator->roundInternal ($cart_prices[$this->_psType . 'Value'], 'salesPrice');
 				// Calculate the tax from the final sales price:
 				$calculator->setRevert (true);
-				$cart_prices[$this->_psType . 'Tax'] = $cart_prices['salesPrice' . $_psType] - $calculator->roundInternal ($calculator->executeCalculation($taxrules, $cart_prices[$this->_psType . 'Value'], true));
+				$cart_prices[$this->_psType . 'Value'] = $calculator->roundInternal ($calculator->executeCalculation($taxrules, $cart_prices[$this->_psType . 'Value'], true));
+				$cart_prices[$this->_psType . 'Tax'] = $cart_prices['salesPrice' . $_psType] - $cart_prices[$this->_psType . 'Value'];
 				$calculator->setRevert (false);
 			} else {
 				$cart_prices['salesPrice' . $_psType] = $calculator->roundInternal ($calculator->executeCalculation ($taxrules, $cart_prices[$this->_psType . 'Value']), 'salesPrice');
@@ -299,7 +300,7 @@ class plgVmShipmentRules_Shipping_Base extends vmPSPlugin {
 			}
 			reset($taxrules);
 			$taxrule =  current($taxrules);
-			$cart_prices[$this->_psType . '_calc_id'] = $taxrules[0]['virtuemart_calc_id'];
+			$cart_prices[$this->_psType . '_calc_id'] = $taxrule['virtuemart_calc_id'];
 		} else {
 			$cart_prices['salesPrice' . $_psType] = $value;
 			$cart_prices[$this->_psType . 'Tax'] = 0;