fix a bug

Bug: when mod_number = 2 , can't find the best solution.