Tried to fix offsets when writing at the end of the area