fixed that bug that only output the first line of a program