Bugfix -- make sure read from client to ram has finished before reading from it.