fixing anomalyDetection