Add client. Fix bugs.