Fixed checking last position.
All positions are stored for searching repeating positions.
Merge remote-tracking branch 'remotes/origin/master' into development
Fixed searching neighbors.