Further adjust proxy write.

For some reason, just calling `end` does not work either.