fixed analysis code BB and AS