Fix crash if text containing \n is printed at nonzero x