Fixing some JS