fix bug in self-avoiding sampling