fix error if root template not exists