corrected to not throw error with fit_component