Bug fixes in the client libraries

tada