Fix bug in dichotomic