Javascript test fixes