Fix up the javascript.