fix bisect_pair on programs not returning 0
fix double to int conversions