integrate corrected for masked tails