Fix problem with print last line