minor bug fix

It's better to initialize 'best_fi' and 'best_t' before the for loop.