fixing resource loading