fixed bug in Resource