A modified simulation scheme for inference in Bayesian networks