Fixed server code and trailing ws.