tscube bug fix, binary search problem