bugfix invalid bio_read/write sz