A couple of javascript fixes.