Fixed some bugs in analyzer.