The index in PathPoint class is started from 0 now.