fixed to use with multi-tenant application