fix bin_number bug