Personal Portfolio Project Feedback/help

Hi everyone, I am having trouble with the jQuery slow scroll to anchor functionality I added to my portfolio. It mostly works but when I try to scroll from the contact section at the bottom to the projects section it snaps all the way to the top and i’m not sure why. My only guess is that the page isn’t long enough and when you are at the bottom of the page it still considers it in the projects section but i’m really not sure. Also any general feedback unrelated to that is appreciated.

(edit I just realized the imgur links don’t work unless I open them up directly in browser first so I am trying to get them uploaded somewhere that lets codepen get them)

Here is my pen: http://codepen.io/MP7373/full/zKaBBq/