Fix: fix errors when templates not set