diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php
index 24a3ce3d0d65a867640dbe165d14cb57be56a820..8c911397fd6c0ff792e21210338b7a829834f79f 100644
--- a/interface/lib/classes/quota_lib.inc.php
+++ b/interface/lib/classes/quota_lib.inc.php
@@ -250,7 +250,7 @@ class quota_lib {
 				$databases[$i]['used'] = isset($monitor_data[$databasename]['size']) ? $monitor_data[$databasename]['size'] : 0;
 	
 				$databases[$i]['quota_raw'] = $databases[$i]['database_quota'];
-				$databases[$i]['used_raw'] = $databases[$i]['used'];
+				$databases[$i]['used_raw'] = $databases[$i]['used'] / 1024 / 1024; //* quota is stored as MB - calculated bytes
 				$databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used'] * 100 / $databases[$i]['database_quota']) : 0;
 	
 				if ($readable) {
@@ -267,7 +267,7 @@ class quota_lib {
 					if($databases[$i]['database_quota'] == 0){
 						$databases[$i]['database_quota'] = $app->lng('unlimited');
 					} else {
-						$databases[$i]['database_quota'] = round($databases[$i]['database_quota'] / 1048576, 4).' MB';
+						$databases[$i]['database_quota'] = $databases[$i]['database_quota'] . ' MB';
 					}
 						
 						
@@ -283,4 +283,4 @@ class quota_lib {
 		return $databases;
 	}
 	
-}
\ No newline at end of file
+}
diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php
index bdc09095c357539a26762eb1f59fa0fafe2ace9c..faf362190f8f3d1169989966eae04518aad97f24 100644
--- a/interface/web/sites/database_quota_stats.php
+++ b/interface/web/sites/database_quota_stats.php
@@ -29,7 +29,7 @@ if(is_array($tmp_rec)) {
 		foreach($tmp_array as $database_name => $data) {
 			$db_name = $data['database_name'];
 
-			$temp = $app->db->queryOneRecord("SELECT client.username, web_database.database_quota FROM web_database, sys_group, client WHERE web_database.sys_groupid = sys_group.groupid AND sys_group.client_id = client.client_id AND web_database.database_name = ?", $db_name);
+			$temp = $app->db->queryOneRecord("SELECT client.username, web_database.database_quota FROM web_database, sys_group, client WHERE sys_group.client_id = client.client_id AND web_database.database_name = ?", $db_name);
 			if(is_array($temp) && !empty($temp)) {
 				$monitor_data[$server_id.'.'.$db_name]['database_name'] = $data['database_name'];
 				$monitor_data[$server_id.'.'.$db_name]['client'] = isset($temp['username']) ? $temp['username'] : '';