More javascript fixes

yaaaaaay!!