diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 4c98808592c94f412f0c74a72992dce2de94e433..33102f2747584407d0e19214340b5f706aa58cff 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -939,11 +939,22 @@ int vp8_decode_frame(VP8D_COMP *pbi)
 
             vpx_memset(xd->segment_feature_data, 0, sizeof(xd->segment_feature_data));
 
-            /* For each segmentation feature (Quant and loop filter level) */
+#if CONFIG_SEGFEATURES
+            // For each segmentation...
+            for (j = 0; j < MAX_MB_SEGMENTS; j++)
+            {
+                // For each of the segments features...
+                for (i = 0; i < SEG_LVL_MAX; i++)
+                {
+
+#else
+            // For each segmentation feature...
             for (i = 0; i < SEG_LVL_MAX; i++)
             {
+                // For each segmentation...
                 for (j = 0; j < MAX_MB_SEGMENTS; j++)
                 {
+#endif
                     /* Frame level data */
                     if (vp8_read_bit(bc))
                     {
diff --git a/vp8/encoder/bitstream.c b/vp8/encoder/bitstream.c
index 889f09e49ef09ebb634b9bbcf3f658298d8425f8..c4901bf7ba37e954eedbfd32f31feb7b2b15e208 100644
--- a/vp8/encoder/bitstream.c
+++ b/vp8/encoder/bitstream.c
@@ -1846,11 +1846,19 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size)
 
             vp8_write_bit(bc, (xd->mb_segement_abs_delta) ? 1 : 0);
 
-            // For each segmentation codable feature
+#if CONFIG_SEGFEATURES
+            // For each segments id...
+            for (j = 0; j < MAX_MB_SEGMENTS; j++)
+            {
+                // For each segmentation codable feature...
+                for (i = 0; i < SEG_LVL_MAX; i++)
+#else
+            // For each segmentation codable feature...
             for (i = 0; i < SEG_LVL_MAX; i++)
             {
-                // For each of the segments
+                // For each of the segments id...
                 for (j = 0; j < MAX_MB_SEGMENTS; j++)
+#endif
                 {
                     Data = xd->segment_feature_data[j][i];
 
@@ -1862,12 +1870,14 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size)
                         if (Data < 0)
                         {
                             Data = - Data;
-                            vp8_write_literal(bc, Data, mb_feature_data_bits[i]);
+                            vp8_write_literal(bc, Data,
+                                              mb_feature_data_bits[i]);
                             vp8_write_bit(bc, 1);
                         }
                         else
                         {
-                            vp8_write_literal(bc, Data, mb_feature_data_bits[i]);
+                            vp8_write_literal(bc, Data,
+                                              mb_feature_data_bits[i]);
                             vp8_write_bit(bc, 0);
                         }
                     }
diff --git a/vp8/encoder/picklpf.c b/vp8/encoder/picklpf.c
index df8a2b2793deff3018ae6e24fcd539440bc8eaf3..0585d66e2c0425e4043bc73ac558b8f1176b127b 100644
--- a/vp8/encoder/picklpf.c
+++ b/vp8/encoder/picklpf.c
@@ -261,7 +261,7 @@ void vp8cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val)
 
     mbd->segment_feature_data[0][SEG_LVL_ALT_LF] = cpi->segment_feature_data[0][SEG_LVL_ALT_LF];
     mbd->segment_feature_data[1][SEG_LVL_ALT_LF] = cpi->segment_feature_data[1][SEG_LVL_ALT_LF];
-    mbd->segment_feature_data[2][SEG_LVL_ALT_LF] = cpi->segment_feature_data[2[SEG_LVL_ALT_LF]];
+    mbd->segment_feature_data[2][SEG_LVL_ALT_LF] = cpi->segment_feature_data[2][SEG_LVL_ALT_LF];
     mbd->segment_feature_data[3][SEG_LVL_ALT_LF] = cpi->segment_feature_data[3][SEG_LVL_ALT_LF];
 }