fix inconsistency issue between kernel and fit