cast to ObjectId for template domain, so it is saved properly including ...

...domain