More js fixes
More javascript errors fixed