Fixed bugs in the binary_find()

two bugs, non existing entries and single values near min & max