Fixed infinite loop in printline