Fix some derpery in the JS.