fix a bug with long writes