How a pilot stayed calm in an emergency