diff --git a/include/client/templates/thread-entries.tmpl.php b/include/client/templates/thread-entries.tmpl.php
index edd71b4a8a0e927a34d067537522b1b8f487f72c..93843210969e4e3d79aea05b4ad692805dc5f95f 100644
--- a/include/client/templates/thread-entries.tmpl.php
+++ b/include/client/templates/thread-entries.tmpl.php
@@ -34,7 +34,9 @@ if (count($entries)) {
                 $events->next();
                 $event = $events->current();
             }
+            ?><div id="thread-entry-<?php echo $entry->getId(); ?>"><?php
             include 'thread-entry.tmpl.php';
+            ?></div><?php
         }
         $i++;
     }
diff --git a/include/client/tickets.inc.php b/include/client/tickets.inc.php
index fab773d8e2136c1f90a02cbf763586f272a94697..99fb7a32929919447029ca4eb47370e181bea9be 100644
--- a/include/client/tickets.inc.php
+++ b/include/client/tickets.inc.php
@@ -201,19 +201,19 @@ if ($closedTickets) {?>
     <thead>
         <tr>
             <th nowrap>
-                <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?><i class="icon-sort"></i></a>
+                <a href="tickets.php?sort=ID&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Ticket ID"><?php echo __('Ticket #');?>&nbsp;<i class="icon-sort"></i></a>
             </th>
             <th width="120">
-                <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?><i class="icon-sort"></i></a>
+                <a href="tickets.php?sort=date&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Date"><?php echo __('Create Date');?>&nbsp;<i class="icon-sort"></i></a>
             </th>
             <th width="100">
-                <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?><i class="icon-sort"></i></a>
+                <a href="tickets.php?sort=status&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Status"><?php echo __('Status');?>&nbsp;<i class="icon-sort"></i></a>
             </th>
             <th width="320">
-                <a href="tickets.php?sort=subj&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?><i class="icon-sort"></i></a>
+                <a href="tickets.php?sort=subject&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Subject"><?php echo __('Subject');?>&nbsp;<i class="icon-sort"></i></a>
             </th>
             <th width="120">
-                <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?><i class="icon-sort"></i></a>
+                <a href="tickets.php?sort=dept&order=<?php echo $negorder; ?><?php echo $qstr; ?>" title="Sort By Department"><?php echo __('Department');?>&nbsp;<i class="icon-sort"></i></a>
             </th>
         </tr>
     </thead>
diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js
index 23a30fc29676d221f0f69e15f0c1f757f796acf0..da4b1c203277c2c696520f1a60d870c6138636e8 100644
--- a/js/redactor-osticket.js
+++ b/js/redactor-osticket.js
@@ -94,6 +94,7 @@ RedactorPlugins.draft = function() {
             // No change yet — dont't show the button
             return;
         }
+        this.$box.find('textarea').attr('data-draft-id', this.opts.draftId);
         if (data && this.code.get()) {
             this.$draft_saved.show().delay(5000).fadeOut();
         }
@@ -290,10 +291,20 @@ $(function() {
         var reset = $('input[type=reset]', el.closest('form'));
         if (reset) {
             reset.click(function() {
-                if (el.hasClass('draft'))
-                    el.redactor('deleteDraft');
-                else
-                    el.redactor('set', '', false, false);
+                var file = $('.file');
+                if (file)
+                    file.remove();
+                if (el.attr('data-draft-id'))
+                    el.redactor('draft.deleteDraft').attr('data-draft-id', '');
+                else {
+                    try {
+                        el.redactor('insert.set', '', false, false);
+                    }
+                    catch (error) {
+                        el.redactor(); //reinitialize redactor
+                        el.redactor('insert.set', '', false, false);
+                    }
+                }
             });
         }
         $('input[type=submit]', el.closest('form')).on('click', function() {
@@ -301,7 +312,13 @@ $(function() {
             // where Redactor does not sync properly after adding an image.
             // Therefore, the ::get() call will not include text added after
             // the image was inserted.
-            el.redactor('code.sync');
+            try {
+                el.redactor('code.sync');
+            }
+            catch (error) {
+                el.redactor(); //reinitialize redactor
+                el.redactor('code.sync');
+            }
         });
         if (!$.clientPortal) {
             options['plugins'] = options['plugins'].concat(
diff --git a/scp/js/scp.js b/scp/js/scp.js
index 6b68d970a6581b46fc2dcca8c954d9b68b8888c5..bbc7a7bf5d93b7d9f18849302168becdd4a985b2 100644
--- a/scp/js/scp.js
+++ b/scp/js/scp.js
@@ -378,7 +378,8 @@ var scp_prep = function() {
            $('input[name^='+attr+']', ui.item.parent('tbody')).each(function(i, el) {
                $(el).val(i + 1 + offset);
            });
-       }
+       },
+       'cancel': ':input,button,div[contenteditable=true]'
    });
 
     // Scroll to a stop or top on scroll-up click