Fix bug with numBytesDecoded being wrong.