diff --git a/include/.htaccess b/include/.htaccess
new file mode 100644
index 0000000000000000000000000000000000000000..3a42882788717c9ed1d5c2fcc3277d21ec13152b
--- /dev/null
+++ b/include/.htaccess
@@ -0,0 +1 @@
+Deny from all
diff --git a/include/class.canned.php b/include/class.canned.php
index 0550e81ba839da8273558e029881e186f9d4c844..0bdc492a463b97604e35a9e58b7861e42ce61dcd 100644
--- a/include/class.canned.php
+++ b/include/class.canned.php
@@ -37,6 +37,8 @@ class Canned {
             .' LEFT JOIN '.CANNED_ATTACHMENT_TABLE.' attach ON (attach.canned_id=canned.canned_id) ' 
             .' LEFT JOIN '.FILTER_TABLE.' filter ON (canned.canned_id = filter.canned_response_id) '
             .' WHERE canned.canned_id='.db_input($id);
+            .' GROUP BY canned.canned_id';
+
         if(!($res=db_query($sql)) ||  !db_num_rows($res))
             return false;
 
diff --git a/include/class.pdf.php b/include/class.pdf.php
index 2257dcc17aa6641fabeeac32a3fcecc28bd7b2c0..17c2e05886538028468952af9518e2695e51793f 100644
--- a/include/class.pdf.php
+++ b/include/class.pdf.php
@@ -82,12 +82,24 @@ class Ticket2PDF extends FPDF
 		$this->Cell(0, 7, 'Page ' . ($this->PageNo() - $this->pageOffset), 0, 0, 'R');
 	}
 
+    function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') {
+        parent::Cell($w, $h, $this->_utf8($txt), $border, $ln, $align, $fill, $link);
+    }
+
     function WriteText($w, $text, $border) {
 
         $this->SetFont('Times','',11);
         $this->MultiCell($w, 5, $text, $border, 'L');
 
     }
+
+    function _utf8($text) {
+
+        if(function_exists('iconv'))
+            return iconv('UTF-8', 'windows-1252', $text);
+        
+        return utf8_encode($text);
+    }
     
     function _print() {
 
@@ -95,7 +107,7 @@ class Ticket2PDF extends FPDF
             return;
 
         $w =(($this->w/2)-$this->lMargin);
-        $l = 40;
+        $l = 35;
         $c = $w-$l;
         $this->SetDrawColor(220, 220, 220);
         $this->SetFillColor(244, 250, 255);
diff --git a/include/staff/login.tpl.php b/include/staff/login.tpl.php
index 2d8a41f650601c2ec8396ecb89a8ea5ac90a4790..2b4d21ad015f1e2d6124c8a3422572bcce53d91e 100644
--- a/include/staff/login.tpl.php
+++ b/include/staff/login.tpl.php
@@ -9,6 +9,12 @@
     <meta http-equiv="cache-control" content="no-cache" />
     <meta http-equiv="pragma" content="no-cache" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
+    <script type="text/javascript">
+        $(document).ready(function() {
+            $("input:not(.dp):visible:enabled:first").focus();
+         });
+    </script>
 </head>
 <body id="loginBody">
 <div id="loginBox">
diff --git a/include/staff/settings-autoresp.inc.php b/include/staff/settings-autoresp.inc.php
index 0d3a2ab9c20f06824d72bf9cd82dd45fc338cd08..b5815915fc346bb97fbfa318db9416bda6bfccce 100644
--- a/include/staff/settings-autoresp.inc.php
+++ b/include/staff/settings-autoresp.inc.php
@@ -1,3 +1,4 @@
+<h2>Autoresponder Settings</h2>
 <form action="settings.php?t=autoresp" method="post" id="save">
 <?php csrf_token(); ?>
 <input type="hidden" name="t" value="autoresp" >
diff --git a/setup/setup.inc.php b/setup/setup.inc.php
index 07b86c6ffa43e13338f3b1f6c176e0cee2f53316..f2ba0089004eadf073aba84c87f76a33fd6f39a0 100644
--- a/setup/setup.inc.php
+++ b/setup/setup.inc.php
@@ -17,8 +17,14 @@
 #This  version - changed on every release
 define('THIS_VERSION', '1.7-RC2');
 
-#inits
-error_reporting(E_ALL ^ E_NOTICE); //turn on errors??
+#inits - error reporting.
+$error_reporting = E_ALL & ~E_NOTICE;
+if (defined('E_STRICT')) # 5.4.0
+    $error_reporting &= ~E_STRICT;
+if (defined('E_DEPRECATED')) # 5.3.0
+    $error_reporting &= ~(E_DEPRECATED | E_USER_DEPRECATED);
+
+error_reporting($error_reporting); 
 ini_set('magic_quotes_gpc', 0);
 ini_set('session.use_trans_sid', 0);
 ini_set('session.cache_limiter', 'nocache');