             {
                 n = ba.byteLength;
                 newBuffer = new ArrayBuffer(n + extra);
-                newView = new Int8Array(newBuffer, 0, n);
-                view = new Int8Array(ba, 0, n);
+                newView = new Uint8Array(newBuffer, 0, n);
+                view = new Uint8Array(ba, 0, n);
                 for (i = 0; i < n; i++)
                 {
                     newView[i] = view[i];

        }
        COMPILE::JS
        {
            var view:Int8Array;
            
            view = new Int8Array(ba, _position, 1);
            _position++;
            return view[0];
        }

        }
        COMPILE::JS
        {
            var view:Uint8Array;
            
            growBuffer(1);
            
            view = new Uint8Array(ba, _position, 1);
            view[0] = byte;
            _position++;
        }
