Fixed bug in sampling u and backward sampling