some more javascript fixes