fix template.php