Fixed NecessaryStepsExtraction() bugs in LFHD.