Fixed test_match_template