diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index da02e7a1917684b451eaf0c30ff923cc2875656e..2ed5761a24c9be3a48f84799376da648ae41eef2 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -90,7 +90,7 @@ class remoting {
 		}
 
 		//* Delete old remoting sessions
-		$sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMSTAMP()";
+		$sql = "DELETE FROM remote_session WHERE tstamp < UNIX_TIMESTAMP()";
 		$app->db->query($sql);
 
 		if($client_login == true) {
@@ -231,7 +231,7 @@ class remoting {
 
 		/* copied from the client_edit php */
 		exec('ssh-keygen -t rsa -C '.$username.'-rsa-key-'.time().' -f /tmp/id_rsa -N ""');
-		$app->db->query("UPDATE client SET created_at = UNIX_TIMSTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id);
+		$app->db->query("UPDATE client SET created_at = UNIX_TIMESTAMP(), id_rsa = ?, ssh_rsa = ? WHERE client_id = ?", @file_get_contents('/tmp/id_rsa'), @file_get_contents('/tmp/id_rsa.pub'), $this->id);
 		exec('rm -f /tmp/id_rsa /tmp/id_rsa.pub');
 
 
@@ -475,7 +475,7 @@ class remoting {
 			return false;
 		}
 
-		$sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMSTAMP()";
+		$sql = "SELECT * FROM remote_session WHERE remote_session = ? AND tstamp >= UNIX_TIMESTAMP()";
 		$session = $app->db->queryOneRecord($sql, $session_id);
 		if($session['remote_userid'] > 0) {
 			return $session;
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 9ee3ca547c2d11cf0e9b89f7cbaac4251435f071..1299080156d2a99d3d127958724d5c7c9dff6bbf 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -243,9 +243,9 @@ class remoting_lib extends tform_base {
 				if($key == '#OFFSET#') $sql_offset = $app->functions->intval($val);
 				elseif($key == '#LIMIT#') $sql_limit = $app->functions->intval($val);
 				elseif(stristr($val, '%')) {
-					$sql_where .= "? like ? AND ";
+					$sql_where .= "?? like ? AND ";
 				} else {
-					$sql_where .= "? = ? AND ";
+					$sql_where .= "?? = ? AND ";
 				}
 				$params[] = $key;
 				$params[] = $val;