fixup javascript for on call