fixed template parser to use the proper check for open tag