added an extra check to make sure if the next element is in the board, but is not near our current element, break it off