Fix client API

See #32.