Minor fixes in Client and Connection