Fix bug with pretty printing when characters got to the last row of the console.