template.php fix