fix bug on rest client