Pay attention to open_block_size() min_size argument; fix some casts