Fixed client crash when connected to a server.