Fix Rest client of policy agent