Fixed problems with error reporting in client and server.