Fixed some js loading problems