Fixes resource loading on page load.