fix bb_put_bytes

bb_put_bytes and bb_put_bytes_at has bug in loop