Fix bestFit method