fixed resource loading concurrency issue