diff --git a/webui/user/index.php b/webui/user/index.php
index ad89221babc6510305b2a9a1d5e69904b7f5778d..7bcf2e8a930fd7e091b83149c47b313024f77a02 100644
--- a/webui/user/index.php
+++ b/webui/user/index.php
@@ -69,39 +69,37 @@ function displayDetails() {
 
 	# Set total traffic and uptime used
 	$totalTraffic = 0;
-	$totalInputData = 0;
-	$totalOutputData = 0;
 	$totalUptime = 0;
 	while ($row = $res->fetchObject()) {
 
-		# Input
+		# Traffic in
 		$inputDataItem = 0;
 
-		if (!isset($row->acctinputoctets) && $row->acctinputoctets > 0) {
-			$inputDataItem += ($row->accinputoctets / 1024 / 1024);
+		if (isset($row->acctinputoctets) && $row->acctinputoctets > 0) {
+			$inputDataItem += ($row->acctinputoctets / 1024) / 1024;
 		}
-		if (!empty($row->acctinputgigawords) && $row->acctinputgigawords > 0) {
+		if (isset($row->acctinputgigawords) && $row->acctinputgigawords > 0) {
 			$inputDataItem += ($row->acctinputgigawords * 4096);
 		}
 
 		$totalTraffic += $inputDataItem;
 
-		# Output
+		# Traffic out
 		$outputDataItem = 0;
 
-		if (!empty($row->acctoutputoctets) && $row->acctoutputoctets > 0) {
-			$outputDataItem += ($row->acctoutputoctets / 1024 / 1024);
+		if (isset($row->acctoutputoctets) && $row->acctoutputoctets > 0) {
+			$outputDataItem += ($row->acctoutputoctets / 1024) / 1024;
 		}
-		if (!empty($row->acctoutputgigawords) && $row->acctoutputgigawords > 0) {
+		if (isset($row->acctoutputgigawords) && $row->acctoutputgigawords > 0) {
 			$outputDataItem += ($row->acctoutputgigawords * 4096);
 		}
 
 		$totalTraffic += $outputDataItem;
 
 
-		# Time calculation
+		# Uptime
 		$sessionTimeItem = 0;
-		if (!empty($row->acctsessiontime) && $row->acctsessiontime > 0) {
+		if (isset($row->acctsessiontime) && $row->acctsessiontime > 0) {
 			$sessionTimeItem += $row->acctsessiontime;
 		}
 
@@ -454,6 +452,8 @@ function displayDetails() {
 ?>
 		<tr>
 			<td></td>
+		</tr>
+		<tr>
 			<td></td>
 		</tr>
 		<tr>
diff --git a/webui/user/logs.php b/webui/user/logs.php
index 84e429625822df902079155147b7a5f3d55ad74a..6fe222977649350a3d4662d63637fc5a85638af1 100644
--- a/webui/user/logs.php
+++ b/webui/user/logs.php
@@ -135,10 +135,10 @@ function displayLogs() {
 				# Input data calculation
 				$inputDataItem = 0;
 
-				if (!empty($row->acctinputoctets) && $row->acctinputoctets > 0) {
+				if (isset($row->acctinputoctets) && $row->acctinputoctets > 0) {
 					$inputDataItem += ($row->acctinputoctets / 1024) / 1024;
 				}
-				if (!empty($row->acctinputgigawords) && $row->inputgigawords > 0) {
+				if (isset($row->acctinputgigawords) && $row->acctinputgigawords > 0) {
 					$inputDataItem += ($row->acctinputgigawords * 4096);
 				}
 				$totalInputData += $inputDataItem;
@@ -147,10 +147,10 @@ function displayLogs() {
 				# Output data calculation
 				$outputDataItem = 0;
 
-				if (!empty($row->acctoutputoctets) && $row->acctoutputoctets > 0) {
+				if (isset($row->acctoutputoctets) && $row->acctoutputoctets > 0) {
 					$outputDataItem += ($row->acctoutputoctets / 1024) / 1024;
 				}
-				if (!empty($row->acctoutputgigawords) && $row->acctoutputgigawords > 0) {
+				if (isset($row->acctoutputgigawords) && $row->acctoutputgigawords > 0) {
 					$outputDataItem += ($row->acctoutputgigawords * 4096);
 				}
 				$totalOutputData += $outputDataItem;
@@ -160,7 +160,7 @@ function displayLogs() {
 
 				# Time calculation
 				$sessionTimeItem = 0;
-				if (!empty($row->acctsessiontime) && $row->acctsessiontime > 0) {
+				if (isset($row->acctsessiontime) && $row->acctsessiontime > 0) {
 					$sessionTimeItem += ($row->acctsessiontime - ($row->acctsessiontime % 60)) / 60;
 				}