bind Ubuntu / Centos difference

I have the followinn BIND DNS records for new domains in my template

${DOM}. IN NS ns1.${DOM}.
${DOM}. IN NS ns2.${DOM}.

It works fine in Centos.

But Ubuntu complains (error “nameserver doesn’t exit”). I can fix this by adding a record for the above servers. But I am wondering why there is a difference and more important how I could automate this? Or maybe there is a different way?

.