bug fix in the client api wrapper