fix in fit_tail.hpp