What were the general provisions of the Treaty of Ghent? Why did the war proceed even after the treaty was signed?