The end of a difficult presidency