diff --git a/html/pages/locations.php b/html/pages/locations.php
index 8c44c27e73..cd03b26bc3 100644
--- a/html/pages/locations.php
+++ b/html/pages/locations.php
@@ -11,7 +11,7 @@ if($_SESSION['userlevel'] == '10') {
$device_query = mysql_query($sql);
while($device = mysql_fetch_array($device_query)) {
- if($bg == "#ffffff") { $bg = "#eeeeee"; } else { $bg="#ffffff"; }
+ if(!isset($bg) || $bg == "#ffffff") { $bg = "#eeeeee"; } else { $bg="#ffffff"; }
if($_SESSION['userlevel'] == '10') {
$num = mysql_result(mysql_query("SELECT COUNT(device_id) FROM devices WHERE location = '" . $device['location'] . "'"),0);
diff --git a/html/pages/sensors.php b/html/pages/sensors.php
index dcf4eaac1b..c346d62ac2 100644
--- a/html/pages/sensors.php
+++ b/html/pages/sensors.php
@@ -4,10 +4,10 @@ $datas = array('Temperatures', 'Voltages', 'Fanspeeds');
print_optionbar_start();
-unset ($sep);
+$sep = "";
foreach ($datas as $texttype) {
$type = strtolower($texttype);
- if (!$_GET['opta']) { $_GET['opta'] = $type; }
+ if (!isset($_GET['opta'])) { $_GET['opta'] = $type; }
echo($sep);
if ($_GET['opta'] == $type) { echo(""); }
echo(" " . $texttype ."\n");