A reason the US and Great Britain ended the war of 1812 was because