Fix bug in Curve2Mask.f95