At first glance: If you start at index 0 and subtract 1, it will try and search for point at index -1.