fixed reference to temporary in Sampler (resolves #141)