I tried it again, looks like Im just dumb and forgot that the starting position counts as a part of the path too! Your code is fine, sorry, my mistake haha.