diff --git a/js/inputmask.js b/js/inputmask.js
index <HASH>..<HASH> 100644
--- a/js/inputmask.js
+++ b/js/inputmask.js
@@ -1639,7 +1639,7 @@
 						if (unmaskedValue !== null) {
 							var bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join("");
 							if ($.isFunction(opts.onUnMask)) {
-								unmaskedValue = (opts.onUnMask.call($input, bufferValue, unmaskedValue, opts) || unmaskedValue);
+								unmaskedValue = (opts.onUnMask.call(input, bufferValue, unmaskedValue, opts) || unmaskedValue);
 							}
 						}
 						return unmaskedValue;
Bugfix for unresolved variable $input

$input variable is undefined in `unmaskedvalue` function.