Updated JS files to fix bug reported by Eric Biesterfeld