fixes to ResourceManager