Fix some typos and calculation of initial weights