Fix undefined variable usage in JS.