Corrected the mistake, now algorithm converges nicely