The president was more at ease on foreign policy – but his remarks were overshadowed by a couple of high-profile gaffes