bug in fparmasked_sampling.R