Fix globalSize/Offset in writeField