fix typo in template condition