fixed error in addResource