Fixed template pattern mathcing.