diff --git a/Makefile b/Makefile
index 0a22fc76f885a37727f4b0195817119a9f8b8945..b552ba65fbfc06b212ee1e5b6699f3896a908b8a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 BASE=ordernumber
 PLUGINTYPE=vmshopper
-VERSION=4.0.1
+VERSION=4.0.2
 
 PLUGINFILES=$(BASE).php ordernumber_helper_joomla.php $(BASE).script.php $(BASE).xml index.html library/
 
diff --git a/library/ordernumber_helper.php b/library/ordernumber_helper.php
index de0180aa30539484b2e1e28186cd5441845899ba..1a4b96642700c64549de6c86c8a13a46bdd739cc 100644
--- a/library/ordernumber_helper.php
+++ b/library/ordernumber_helper.php
@@ -103,7 +103,7 @@ class OrdernumberHelper {
 	
 	public function __($string) {
 		if (isset($this->callbacks["translate"])) {
-			return $this->callbacks["translate"]($string);
+			return call_user_func_array($this->callbacks['translate'], func_get_args());
 		} else {
 			return $string;
 		}
@@ -142,7 +142,7 @@ class OrdernumberHelper {
 
 	public function urlPath($type, $file) {
 		if (isset($this->callbacks['urlPath'])) {
-			return $this->callbacks['urlPath']($type, $file);
+			return call_user_func_array($this->callbacks['urlPath'], func_get_args());
 		} else {
 			throw new Exception('No callback defined for urlPath(type, file)!');
 		}
@@ -150,13 +150,13 @@ class OrdernumberHelper {
 	
 	protected function replacementsCallback ($func, &$reps, $details, $nrtype) {
 		if (isset($this->callbacks[$func])) {
-			return $this->callbacks[$func]($reps, $details, $nrtype);
+			return call_user_func_array($this->callbacks[$func], array($reps, $details, $nrtype));
 		}
 	}
 
 	protected function getCounter($type, $countername, $default) {
 		if (isset($this->callbacks['getCounter'])) {
-			return $this->callbacks['getCounter']($type, $countername, $default);
+			return call_user_func_array($this->callbacks['getCounter'], func_get_args());
 		} else {
 			throw new Exception('No callback defined for getCounter(type, countername, default)!');
 		}
@@ -164,15 +164,15 @@ class OrdernumberHelper {
 	
 	protected function setCounter($type, $countername, $value) {
 		if (isset($this->callbacks['getCounter'])) {
-			return $this->callbacks['getCounter']($type, $countername, $value);
+			return call_user_func_array($this->callbacks['setCounter'], func_get_args());
 		} else {
 			throw new Exception('No callback defined for setCounter(type, countername, value)!');
 		}
 	}
 	
 	public function getAllCounters($type) {
-		if (isset($this->callbacks['getCounter'])) {
-			return $this->callbacks['getCounter']($type);
+		if (isset($this->callbacks['getAllCounters'])) {
+			return call_user_func_array($this->callbacks['getAllCounters'], func_get_args());
 		} else {
 			throw new Exception ('No callback defined for getAllCounters(type)!');
 		}
diff --git a/ordernumber.xml b/ordernumber.xml
index cd5418b9f02a0558c1b1e660af452704e2093a66..ae372c622133c3b41c208b58ea0bfbd7152f6612 100644
--- a/ordernumber.xml
+++ b/ordernumber.xml
@@ -7,7 +7,7 @@
     <authorUrl>http://www.open-tools.net/</authorUrl>
     <copyright>Copyright (C) 2012-2015 Reinhold Kainhofer. All rights reserved.</copyright>
     <license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license>
-    <version>4.0.1</version>
+    <version>4.0.2</version>
     <releaseDate>2015-05-23</releaseDate>
     <releaseType>Minor update</releaseType>
     <downloadUrl>http://open-tools.net/virtuemart/advanced-ordernumbers.html</downloadUrl>
diff --git a/releases/plg_vmshopper_ordernumber_v4.0.2.zip b/releases/plg_vmshopper_ordernumber_v4.0.2.zip
new file mode 100644
index 0000000000000000000000000000000000000000..f39608ec104875f24466cdb3ca5479d59b74ba99
Binary files /dev/null and b/releases/plg_vmshopper_ordernumber_v4.0.2.zip differ