Fixed onWrite check out_buffer points