Fixed Single- and Multi-Tenant code