[BUGFIX] Fixed choosing of inaccessible root template