It pays to add a slight delay in the macro after the Wait for Pattern function, as it'll start typing the following line instantly as soon as it sees the pattern, so if you match your username to establish when a command is finished, it'll start typing before the hostname is finished.