Fix error with bitmap_write_byte not calculating proper offset