fix resource loading error