Fix invalid client error