And where Trump went wrong.