Fix bug with js