fix bug for REST sample calls