diff --git a/scripts/zmupdate.pl.in b/scripts/zmupdate.pl.in
index c1d7c32b7..895e8bd64 100644
--- a/scripts/zmupdate.pl.in
+++ b/scripts/zmupdate.pl.in
@@ -400,8 +400,8 @@ if ( $version ) {
       my $backup = '@ZM_TMPDIR@/'.$Config{ZM_DB_NAME}.'-'.$version.'.dump';
       $command .= ' --add-drop-table --databases '.$Config{ZM_DB_NAME}.' > '.$backup;
       print("Creating backup to $backup. This may take several minutes.\n");
-      print("Executing '$command'\n") if logDebugging();
       ($command) = $command =~ /(.*)/; # detaint
+      print("Executing '$command'\n") if logDebugging();
       my $output = qx($command);
       my $status = $? >> 8;
       if ( $status || logDebugging() ) {
diff --git a/web/includes/Group.php b/web/includes/Group.php
index 3a34e0af4..f5a78f875 100644
--- a/web/includes/Group.php
+++ b/web/includes/Group.php
@@ -19,9 +19,9 @@ class Group extends ZM_Object {
 
   public function delete() {
     if ( property_exists($this, 'Id') ) {
-      dbQuery('DELETE FROM Groups_Monitors WHERE GroupId=?', array($this->{'Id'}));
-      dbQuery('UPDATE Groups SET ParentId=NULL WHERE ParentId=?', array($this->{'Id'}));
-      dbQuery('DELETE FROM Groups WHERE Id=?', array($this->{'Id'}));
+      dbQuery('DELETE FROM `Groups_Monitors` WHERE `GroupId`=?', array($this->{'Id'}));
+      dbQuery('UPDATE `Groups` SET `ParentId`=NULL WHERE `ParentId`=?', array($this->{'Id'}));
+      dbQuery('DELETE FROM `Groups` WHERE Id=?', array($this->{'Id'}));
       if ( isset($_COOKIE['zmGroup']) ) {
         if ( $this->{'Id'} == $_COOKIE['zmGroup'] ) {
           unset($_COOKIE['zmGroup']);
@@ -47,7 +47,7 @@ class Group extends ZM_Object {
 
   public function MonitorIds( ) {
     if ( ! property_exists($this, 'MonitorIds') ) {
-      $this->{'MonitorIds'} = dbFetchAll('SELECT MonitorId FROM Groups_Monitors WHERE GroupId=?', 'MonitorId', array($this->{'Id'}));
+      $this->{'MonitorIds'} = dbFetchAll('SELECT `MonitorId` FROM `Groups_Monitors` WHERE `GroupId`=?', 'MonitorId', array($this->{'Id'}));
     }
     return $this->{'MonitorIds'};
   }
@@ -65,7 +65,7 @@ class Group extends ZM_Object {
       session_write_close();
     }
 
-    return htmlSelect( 'GroupId[]', Group::get_dropdown_options(), isset($_SESSION['GroupId'])?$_SESSION['GroupId']:null, array(
+    return htmlSelect('GroupId[]', Group::get_dropdown_options(), isset($_SESSION['GroupId'])?$_SESSION['GroupId']:null, array(
           'data-on-change' => 'submitThisForm',
           'class'=>'chosen',
           'multiple'=>'multiple',
diff --git a/web/includes/Object.php b/web/includes/Object.php
index 09be86a9e..1fd704ec9 100644
--- a/web/includes/Object.php
+++ b/web/includes/Object.php
@@ -306,7 +306,7 @@ class ZM_Object {
     $fields = array_keys($fields);
 
     if ( $this->Id() ) {
-      $sql = 'UPDATE '.$table.' SET '.implode(', ', array_map(function($field) {return '`'.$field.'`=?';}, $fields)).' WHERE Id=?';
+      $sql = 'UPDATE `'.$table.'` SET '.implode(', ', array_map(function($field) {return '`'.$field.'`=?';}, $fields)).' WHERE Id=?';
       $values = array_map(function($field){ return $this->{$field};}, $fields);
       $values[] = $this->{'Id'};
       if ( dbQuery($sql, $values) )
@@ -314,8 +314,8 @@ class ZM_Object {
     } else {
       unset($fields['Id']);
 
-      $sql = 'INSERT INTO '.$table.
-        ' ('.implode(', ', array_map(function($field) {return '`'.$field.'`';}, $fields)).
+      $sql = 'INSERT INTO `'.$table.
+        '` ('.implode(', ', array_map(function($field) {return '`'.$field.'`';}, $fields)).
           ') VALUES ('.
           implode(', ', array_map(function($field){return '?';}, $fields)).')';
 
@@ -331,7 +331,7 @@ class ZM_Object {
   public function delete() {
     $class = get_class($this);
     $table = $class::$table;
-    dbQuery("DELETE FROM $table WHERE Id=?", array($this->{'Id'}));
+    dbQuery("DELETE FROM `$table` WHERE Id=?", array($this->{'Id'}));
     if ( isset($object_cache[$class]) and isset($object_cache[$class][$this->{'Id'}]) )
       unset($object_cache[$class][$this->{'Id'}]);
   }
diff --git a/web/skins/classic/views/js/event.js b/web/skins/classic/views/js/event.js
index ae14144f5..bddeaaee9 100644
--- a/web/skins/classic/views/js/event.js
+++ b/web/skins/classic/views/js/event.js
@@ -308,7 +308,7 @@ function pauseClicked() {
   streamPause();
 }
 
-function streamPause( ) {
+function streamPause() {
   $j('#modeValue').html('Paused');
   setButtonState( $('pauseBtn'), 'active' );
   setButtonState( $('playBtn'), 'inactive' );