bug fix in from_byte_rect