Fixed several bugs in ResourceManager and Catalog.-Nov.7