fix bugs in TenantsResource