Fix refactor client a bit.