Some fixes in JS.