diff --git a/js/glyphs.js b/js/glyphs.js
index <HASH>..<HASH> 100644
--- a/js/glyphs.js
+++ b/js/glyphs.js
@@ -1031,13 +1031,12 @@ SequenceGlyph.prototype.alphaForQual = function(qual) {
 
 SequenceGlyph.prototype.draw = function(gc) {
     var seq = this._seq;
-    if (!seq)
-        seq = 'NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN';    // FIXME       
 
-    var scale = (this._max - this._min + 1) / seq.length;
+    var seqLength = seq ? seq.length : (this._max - this._min + 1);
+    var scale = (this._max - this._min + 1) / seqLength;
 
-    for (var p = 0; p < seq.length; ++p) {
-        var base = seq.substr(p, 1).toUpperCase();
+    for (var p = 0; p < seqLength; ++p) {
+        var base = seq ? seq.substr(p, 1).toUpperCase() : 'N';
         var color = this.baseColors[base];
         if (!color) {
             color = 'gray';
Fix rendering glitch for long sequence reads.