Fix bug with JQuery call