Fixed error with async read in server.