Fixed bug in analyze