Fixing callback for createDomains