Fix subtle bug in binary search
Merge pull request #58 from cacay/master

Fix bug in binary search