Minor improvements to the client logic.