Fix search (when contiguous is = 0 and another issue with the 1)