Fixed async write bug where a command write exactly fills the write buffer, so the data write does NPE