fixed binary search

Signed-off-by: Joe Kulig <kulandthegang@gmail.com>