Fix create_bitstream()