diff --git a/capsule-prototype/js/PopupPanelWidget.js b/capsule-prototype/js/PopupPanelWidget.js
index 2c720cbfbeb2b65a71f7055edeebde799e5e3942..f5b7cf97c8e8d18010174a530a034eb186d4e649 100644
--- a/capsule-prototype/js/PopupPanelWidget.js
+++ b/capsule-prototype/js/PopupPanelWidget.js
@@ -86,10 +86,10 @@ AnnotationNamePanelEdition.prototype.closeEdition = function () {
     if (this.canEdit) {
         let newValue = this.editDiv.val();
         this.editDiv.val(newValue);
-        if (this.tag.getMetadata('Rekall->name') !== newValue) {
-            this.tag.setMetadata('Rekall->name', newValue);
+        if (this.tag.getMetadata('Rekall->Name') !== newValue) {
+            this.tag.setMetadata('Rekall->Name', newValue);
             window.app.rekall.Rekall('pubSub').publish('tag.metadata.updated', {
-                metadata: "Rekall->name",
+                metadata: "Rekall->Name",
                 tag: this.tag
             });
         }
@@ -179,8 +179,10 @@ function AnnotationTCPanelEdition(data) {
 AnnotationTCPanelEdition.prototype = Object.create(PanelEdition.prototype);
 AnnotationTCPanelEdition.prototype.appendInputEditorDiv = function (parentDiv) {
 
+    // eslint-disable-next-line no-unused-vars
     function onlyNumber(event) {
-        $(this).val($(this).val().replace(/[^0-9]/g, ''));
+        // remove characters that are not number
+        $(this).val($(this).val().replace(/\D/g, ''));
     }
     let that = this;
 
@@ -295,7 +297,7 @@ AnnotationTCPanelEdition.prototype.appendInputEditorDiv = function (parentDiv) {
 }
 AnnotationTCPanelEdition.prototype.closeEdition = function () {
     if (this.canEdit) {
-        let isNaN = (maybeNaN) => maybeNaN!=maybeNaN;
+        let isNaN = (maybeNaN) => maybeNaN !== maybeNaN;
         let ensureNotNaN = (text, defaultValue = 0) => {
             let tempVal = parseInt(text);
             if (isNaN(tempVal)) {