fixing js loading issues