Some JS fixes

Javascript closed bracket fixing