fix a bug that stopping analyzing before it is really done