Optimized script and changed resource request.