Fixed preventDefault bug

Now only prevents Default when there's an actual item to scroll to.