fix a nullpointer bug when a failure happens(and we miss the failure)