fix read resource error