fixed bug in hasConverged()