try to fix matchTemplate