Bug still to be found in importance sampling
merge fix