Fixed searching bug. 1707/1990 unit tests passing