fix js loading issues