cast to ObjectId for template domain, so it is saved properly including domain
Merge pull request #121 from CTcue/templateFix

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