corrected resource loading