fix bugs, recover the program