The US President says he is taking back his comments after Nato committed to fighting terrorism.