fixed logic problem in AnalyzeController