Bugfixes inside media/functions.inc.php and framework/functions-utf8.php