Fixed a potential race condition where the read could occur during a write and send corrupt data back to the client.
Fixed a potential race condition where the read could occur during a write and send corrupt data back to the client.

pmembrey/cakedb,pmembrey/cakedb,pmembrey/cakedb