Fix bug of :cog-convergence-check and add test codes

fix bug of :cog-convergence-check and add test codes