debugging anomalies in fitting