diff --git a/lib/binary_parser.js b/lib/binary_parser.js
index <HASH>..<HASH> 100644
--- a/lib/binary_parser.js
+++ b/lib/binary_parser.js
@@ -324,7 +324,7 @@ Object.keys(PRIMITIVE_TYPES).forEach(function(type) {
 Parser.prototype.generateBit = function(ctx) {
     ctx.bitFields.push(this);
 
-    if (this.next && !this.next.type.match('Bit')) {
+    if (!this.next || (this.next && !this.next.type.match('Bit'))) {
         var sum = 0;
         ctx.bitFields.forEach(function(parser) {
             sum += parser.options.length;
Fixed bug that parser ends with bit parser doesnt work correctly