fixes to client.go