Correct some error on Algorithm