Fix minor bugs in resource metadata