couple-a patches to work with new client format