diff --git a/html/includes/graphs/temperature.inc.php b/html/includes/graphs/temperature.inc.php
index f59d2049c..935349573 100644
--- a/html/includes/graphs/temperature.inc.php
+++ b/html/includes/graphs/temperature.inc.php
@@ -16,6 +16,7 @@ include("common.inc.php");
$rrd_filename = $config['rrd_dir'] . "/".$hostname."/" . safename("temp-" . $temperature['temp_descr'] . ".rrd");
+
$rrd_options .= " DEF:temp=$rrd_filename:temp:AVERAGE";
$rrd_options .= " DEF:temp_max=$rrd_filename:temp:MAX";
$rrd_options .= " DEF:temp_min=$rrd_filename:temp:MIN";
diff --git a/includes/common.php b/includes/common.php
index 5e7b700d4..50db46ac7 100644
--- a/includes/common.php
+++ b/includes/common.php
@@ -89,7 +89,8 @@ function gethostosbyid($id) {
function safename($name)
{
- return preg_replace('/[^a-zA-Z0-9,._\+\(\)\-]/', '_', $name);
+ return preg_replace('/[^a-zA-Z0-9,._\-]/', '_', $name);
+
}