fixed resource reading