diff --git a/components/milliways.php b/components/milliways.php
index 7ca7213ddcbf4ebac5602f6011619b0898af4944..d4e33796e7a37853802005be2d1615f6c038f339 100644
--- a/components/milliways.php
+++ b/components/milliways.php
@@ -16,7 +16,7 @@ function parseIdleTime($idletime) {
 		$seconds = $idlearray[0];
 	}
 
-	return ($hours * 3600) + ($minutes * 60) + $seconds;
+	return (intval($hours * 3600)) + (intval($minutes) * 60) + intval($seconds);
 
 }
 
@@ -26,6 +26,7 @@ function compare_idletime($a, $b) {
 
 exec("/usr/bin/mw -who", $wholist, $ret);
 $people = array();
+$idlers = array();
 foreach ($wholist as $person) {
     $pid = strtok($person, " ");
     if ($pid == "" || $pid == "Name" || substr($pid,0,5)=="-----") continue;
@@ -34,6 +35,7 @@ foreach ($wholist as $person) {
 	"idle"     => trim(substr($person, 18, 6)),
 	"idleseconds" => parseIdleTime(trim(substr($person, 18, 6))),
 	"what"     => substr($person,25));
+
 	if ($person['idleseconds'] > 3600) {
 		$idlers[] = $person;
 	} else {