Practice, practice, practice. Eventually it gets to the point where - if somebody yawns at the wrong moment or you catch the wrong person's eye - you can feel yourself starting to go blank and panic, but you find the next line is still there when you get to it.