fixed two minor bugs in analysis