fixed bug in bit stream extract script