Fix resource loading error