fixed bug in javascript iterated participant when getting a sample from a chain