Getting rid of some more javascript errors