Little fixes on JS