diff --git a/files/templates/userpage.html b/files/templates/userpage.html
index 5585dd729f..5ba1236fb1 100644
--- a/files/templates/userpage.html
+++ b/files/templates/userpage.html
@@ -320,9 +320,11 @@
function updateTax() {
// let suf = mobile ? "-mobile" : "";
let amount = parseInt(document.getElementById("coins-transfer-amount").value);
+
if(isNaN(amount) || amount < 0) {
amount = 0;
}
+
document.getElementById("coins-transfer-taxed".innerText = amount - Math.ceil(amount*TRANSFER_TAX));
}