Improvements on the Duality Based Method Used in Solving Optimal Power Flow Problems