fixed importance sampling issue