fixed analysis bugs