diff --git a/interface/web/admin/language_import.php b/interface/web/admin/language_import.php
index 00d105cc67e7b8260703361971b4bfefb732bd9f..be822cf5f21e21ec3d339a7e36e01ad974fc7167 100644
--- a/interface/web/admin/language_import.php
+++ b/interface/web/admin/language_import.php
@@ -36,7 +36,7 @@ function normalize_string($string, $quote, $allow_special = false) {
 	$new_string = '';
 
 	for($c = 0; $c < mb_strlen($string); $c++) {
-		$char = $string{$c};
+		$char = mb_substr($string, $c, 1);
 
 		if($in_string === true && $escaped === false && $char === $quote) {
 			// this marks a string end (e.g. for concatenation)
diff --git a/server/lib/classes/cron.d/100-monitor_system_update.inc.php b/server/lib/classes/cron.d/100-monitor_system_update.inc.php
index 2eea785234c89af63851965e17015dcb6aad8b50..bc4f521073ff3d3813ad286af70c16945121fe09 100644
--- a/server/lib/classes/cron.d/100-monitor_system_update.inc.php
+++ b/server/lib/classes/cron.d/100-monitor_system_update.inc.php
@@ -76,13 +76,13 @@ class cronjob_monitor_system_update extends cronjob {
 			/*
 			 * first update the "apt database"
 			 */
-			shell_exec('apt-get update');
+			shell_exec('while fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get update');
 
 			/*
 			 * Then test the upgrade.
 			 * if there is any output, then there is a needed update
 			 */
-			$aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
+			$aptData = shell_exec('while fuser /var/lib/dpkg/lock >/dev/null 2>&1 || fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 2; done; apt-get -s -qq dist-upgrade');
 			if ($aptData == '') {
 				/* There is nothing to update! */
 				$state = 'ok';