Fix error in w equation.