Fixes for multi-tenant