fix server to send response to client