Fix bug with js required