How to remove extended lines from shapes?
I was trying to make a vector portrait, but sometimes i found that when I draw shapes with pen tool, sometimes it extends the line beyond the anchor point that I close the shape with. No matter what I do, the pen tool just keeps giving me those protruding lines. In Illustrator I don't see them, but when I export it, all the lines are visible. How do I get rid of these lines?
In Illustrator:


In exported PNG:

