minor bug of weight in fit_line