Fixed issue in system/template.php