GetPathsAtoBRadius gives index out of range error