Curve Closest Point on Closed Curve_Issue


I have bunch of closed curves and one point inside those curves. Ultimately I want to find closest edge of the curve from the point inside it. However I do not understand why the result of Curve Closest Point is not giving me a closest point on every case. In some cases closest point is right and in some cases its not.
Find attached image.
your help is appreciated!

My Mistake, Data Structured was messed up!