fix up JS as well (bug 886934)