fixed template check mistake and typo