Fix bug where first step of path prediction was always 0; asking for last element of empty path list