Additional checks added to cover all cases of (non-)selected templates