Copy all lines that are put in history to avoid odd side effects