Fixing code in template.php