fix bug with chaining of pledges