Fix bug with wrong client returned.